<template>
  <view>
    <web-view fullscreen  allow="camera; microphone; autoplay; encrypted-media;" :webview-styles="webviewStyles" :src="url"></web-view>
    <!-- 假设有一个支持WebRTC直播的网站提供了嵌入代码 -->
<!--    <iframe id="liveStreamIframe"-->
<!--            title="WebRTC Live Stream"-->
<!--            src="https://sxran.gitee.io/sxran-im/?sessionId=1&userName=22332111&url=https%3A%2F%2Fyunlvltd.com%2F"-->
<!--            width="640"-->
<!--            height="480"-->
<!--            frameborder="0"-->
<!--            allow="camera; microphone; autoplay; encrypted-media;"-->
<!--            style="border: none;"></iframe>-->

<!--    <iframe src="https://sxran.gitee.io/sxran-im/?sessionId=1&userName=22332332111&url=https%3A%2F%2Fyunlvltd.com%2F" style="position: absolute; display: block; border: 0px; top: 44px; left: 0px; width: 1440px; height: 0px;" allow="microphone; camera"></iframe>-->
<!--    <iframe src="https://docs.openvidu.io/en/stable/tutorials/openvidu-vue/" style="position: absolute; display: block; border: 0px; top: 44px; left: 0px; width: 1440px; height: 0px;" allow="microphone; camera"></iframe>-->
  </view>
</template>

<script>
export default {
  data() {
    return {
      url : "",
      webviewStyles: {
        progress: {
          color: '#FF3333'
        }
      }
    }
  },
  onLoad(e) {
    this.url = `https://sxran.gitee.io/sxran-im/?sessionId=${e.sessionId}&userName=${this.$ws.getSelfUserId()}&url=https%3A%2F%2Fyunlvltd.com%2F`;
  },
}
</script>

<style>

</style>
